class Student():
    def __init__(self, name, age):
        self.name = name
        self.age = age
    def eat(self):
        print(self.name + '在吃饭')

stu1 = Student('张三',20)
stu2 = Student('李四',40)
stu2.gender = "女"
print(stu1.name, stu1.age)
print(stu2.name, stu2.gender, stu2.age)
stu1.eat()
